﻿// Decompiled with JetBrains decompiler
// Type: Pats.Pat
// Assembly: Pats, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: D0F94F32-B68A-430D-B805-24D16F388818
// Assembly location: C:\Users\KasimGulcan\Desktop\Kosgeb\DynaCAD\Project\DynaCAD\abin\Debug\Pats.dll

using System.Windows;
using System.Windows.Media;
using System.Windows.Shapes;

namespace Pats
{
  public class Pat : Shape
  {
    public static readonly DependencyProperty BoyutProperty = DependencyProperty.Register("Boyut", typeof (double), typeof (Pat), (PropertyMetadata) new FrameworkPropertyMetadata((object) 7.0, FrameworkPropertyMetadataOptions.AffectsMeasure));
    public static readonly DependencyProperty StartPointProperty = DependencyProperty.Register("StartPoint", typeof (Point), typeof (Pat), (PropertyMetadata) new FrameworkPropertyMetadata((object) new Point(0.0, 0.0), FrameworkPropertyMetadataOptions.AffectsMeasure));
    public static readonly DependencyProperty EndPointProperty = DependencyProperty.Register("EndPoint", typeof (Point), typeof (Pat), (PropertyMetadata) new FrameworkPropertyMetadata((object) new Point(0.0, 0.0), FrameworkPropertyMetadataOptions.AffectsMeasure));
    public static readonly DependencyProperty PatTipiProperty = DependencyProperty.Register("PatTipi", typeof (Pat.PatTipleri), typeof (Pat), (PropertyMetadata) new FrameworkPropertyMetadata((object) Pat.PatTipleri.Düğme, FrameworkPropertyMetadataOptions.AffectsMeasure));
    public static readonly DependencyProperty AçıProperty = DependencyProperty.Register("Açı", typeof (double), typeof (Pat), (PropertyMetadata) new FrameworkPropertyMetadata((object) 0.0, FrameworkPropertyMetadataOptions.AffectsMeasure));
    public static readonly DependencyProperty AdetProperty = DependencyProperty.Register("Adet", typeof (int), typeof (Pat), (PropertyMetadata) new FrameworkPropertyMetadata((object) 3, FrameworkPropertyMetadataOptions.AffectsMeasure));
    private GeometryGroup GG;

    public double Boyut
    {
      get
      {
        return (double) this.GetValue(Pat.BoyutProperty);
      }
      set
      {
        this.SetValue(Pat.BoyutProperty, (object) value);
      }
    }

    public Point StartPoint
    {
      get
      {
        return (Point) this.GetValue(Pat.StartPointProperty);
      }
      set
      {
        this.SetValue(Pat.StartPointProperty, (object) value);
      }
    }

    public Point EndPoint
    {
      get
      {
        return (Point) this.GetValue(Pat.EndPointProperty);
      }
      set
      {
        this.SetValue(Pat.EndPointProperty, (object) value);
      }
    }

    public Pat.PatTipleri PatTipi
    {
      get
      {
        return (Pat.PatTipleri) this.GetValue(Pat.PatTipiProperty);
      }
      set
      {
        this.SetValue(Pat.PatTipiProperty, (object) value);
      }
    }

    public double Açı
    {
      get
      {
        return (double) this.GetValue(Pat.AçıProperty);
      }
      set
      {
        this.SetValue(Pat.AçıProperty, (object) value);
      }
    }

    public int Adet
    {
      get
      {
        return (int) this.GetValue(Pat.AdetProperty);
      }
      set
      {
        this.SetValue(Pat.AdetProperty, (object) value);
      }
    }

    protected override Geometry DefiningGeometry
    {
      get
      {
        this.PatCalculator();
        return (Geometry) this.GG;
      }
    }

    public Pat()
    {
      this.GG = new GeometryGroup();
    }

    private void PatCalculator()
    {
      this.GG.Children.Clear();
      if (this.PatTipi == Pat.PatTipleri.Düğme)
      {
        if (this.Adet != 1)
        {
          double num1 = (this.EndPoint.X - this.StartPoint.X) / (double) (this.Adet - 1);
          double num2 = (this.EndPoint.Y - this.StartPoint.Y) / (double) (this.Adet - 1);
          for (int index = 0; index < this.Adet; ++index)
          {
            EllipseGeometry ellipseGeometry1 = new EllipseGeometry();
            ellipseGeometry1.RadiusX = ellipseGeometry1.RadiusY = this.Boyut;
            ellipseGeometry1.Center = new Point(this.StartPoint.X + (double) index * num1, this.StartPoint.Y + (double) index * num2);
            EllipseGeometry ellipseGeometry2 = new EllipseGeometry();
            ellipseGeometry2.RadiusX = ellipseGeometry2.RadiusY = this.Boyut / 7.0 * 2.0;
            ellipseGeometry2.Center = new Point(ellipseGeometry1.Center.X + this.Boyut / 7.0 * 3.0, ellipseGeometry1.Center.Y + this.Boyut / 7.0 * 3.0);
            EllipseGeometry ellipseGeometry3 = new EllipseGeometry();
            ellipseGeometry3.RadiusX = ellipseGeometry3.RadiusY = this.Boyut / 7.0 * 2.0;
            ellipseGeometry3.Center = new Point(ellipseGeometry1.Center.X + this.Boyut / 7.0 * 3.0, ellipseGeometry1.Center.Y - this.Boyut / 7.0 * 3.0);
            EllipseGeometry ellipseGeometry4 = new EllipseGeometry();
            ellipseGeometry4.RadiusX = ellipseGeometry4.RadiusY = this.Boyut / 7.0 * 2.0;
            ellipseGeometry4.Center = new Point(ellipseGeometry1.Center.X - this.Boyut / 7.0 * 3.0, ellipseGeometry1.Center.Y + this.Boyut / 7.0 * 3.0);
            EllipseGeometry ellipseGeometry5 = new EllipseGeometry();
            ellipseGeometry5.RadiusX = ellipseGeometry5.RadiusY = this.Boyut / 7.0 * 2.0;
            ellipseGeometry5.Center = new Point(ellipseGeometry1.Center.X - this.Boyut / 7.0 * 3.0, ellipseGeometry1.Center.Y - this.Boyut / 7.0 * 3.0);
            this.GG.Children.Add((Geometry) ellipseGeometry1);
            this.GG.Children.Add((Geometry) ellipseGeometry2);
            this.GG.Children.Add((Geometry) ellipseGeometry3);
            this.GG.Children.Add((Geometry) ellipseGeometry4);
            this.GG.Children.Add((Geometry) ellipseGeometry5);
            this.StrokeThickness = this.Boyut / 7.0;
          }
        }
        else
        {
          EllipseGeometry ellipseGeometry1 = new EllipseGeometry();
          ellipseGeometry1.RadiusX = ellipseGeometry1.RadiusY = this.Boyut;
          ellipseGeometry1.Center = new Point(this.StartPoint.X, this.StartPoint.Y);
          EllipseGeometry ellipseGeometry2 = new EllipseGeometry();
          ellipseGeometry2.RadiusX = ellipseGeometry2.RadiusY = this.Boyut / 7.0 * 2.0;
          ellipseGeometry2.Center = new Point(ellipseGeometry1.Center.X + this.Boyut / 7.0 * 3.0, ellipseGeometry1.Center.Y + this.Boyut / 7.0 * 3.0);
          EllipseGeometry ellipseGeometry3 = new EllipseGeometry();
          ellipseGeometry3.RadiusX = ellipseGeometry3.RadiusY = this.Boyut / 7.0 * 2.0;
          EllipseGeometry ellipseGeometry4 = ellipseGeometry3;
          Point center = ellipseGeometry1.Center;
          double x1 = center.X + this.Boyut / 7.0 * 3.0;
          center = ellipseGeometry1.Center;
          double y1 = center.Y - this.Boyut / 7.0 * 3.0;
          Point point1 = new Point(x1, y1);
          ellipseGeometry4.Center = point1;
          EllipseGeometry ellipseGeometry5 = new EllipseGeometry();
          ellipseGeometry5.RadiusX = ellipseGeometry5.RadiusY = this.Boyut / 7.0 * 2.0;
          EllipseGeometry ellipseGeometry6 = ellipseGeometry5;
          center = ellipseGeometry1.Center;
          double x2 = center.X - this.Boyut / 7.0 * 3.0;
          center = ellipseGeometry1.Center;
          double y2 = center.Y + this.Boyut / 7.0 * 3.0;
          Point point2 = new Point(x2, y2);
          ellipseGeometry6.Center = point2;
          EllipseGeometry ellipseGeometry7 = new EllipseGeometry();
          ellipseGeometry7.RadiusX = ellipseGeometry7.RadiusY = this.Boyut / 7.0 * 2.0;
          EllipseGeometry ellipseGeometry8 = ellipseGeometry7;
          center = ellipseGeometry1.Center;
          double x3 = center.X - this.Boyut / 7.0 * 3.0;
          center = ellipseGeometry1.Center;
          double y3 = center.Y - this.Boyut / 7.0 * 3.0;
          Point point3 = new Point(x3, y3);
          ellipseGeometry8.Center = point3;
          this.GG.Children.Add((Geometry) ellipseGeometry1);
          this.GG.Children.Add((Geometry) ellipseGeometry2);
          this.GG.Children.Add((Geometry) ellipseGeometry3);
          this.GG.Children.Add((Geometry) ellipseGeometry5);
          this.GG.Children.Add((Geometry) ellipseGeometry7);
          this.StrokeThickness = this.Boyut / 7.0;
        }
      }
      else if (this.PatTipi == Pat.PatTipleri.İlik)
      {
        if (this.Adet != 1)
        {
          Point point1 = this.EndPoint;
          double x1 = point1.X;
          point1 = this.StartPoint;
          double x2 = point1.X;
          double num1 = (x1 - x2) / (double) (this.Adet - 1);
          point1 = this.EndPoint;
          double y1 = point1.Y;
          point1 = this.StartPoint;
          double y2 = point1.Y;
          double num2 = (y1 - y2) / (double) (this.Adet - 1);
          for (int index = 0; index < this.Adet; ++index)
          {
            LineGeometry lineGeometry1 = new LineGeometry();
            LineGeometry lineGeometry2 = lineGeometry1;
            point1 = this.StartPoint;
            double x3 = point1.X + (double) index * num1;
            point1 = this.StartPoint;
            double y3 = point1.Y + (double) index * num2 - this.Boyut / 7.0 * 10.0;
            Point point2 = new Point(x3, y3);
            lineGeometry2.StartPoint = point2;
            LineGeometry lineGeometry3 = lineGeometry1;
            point1 = this.StartPoint;
            double x4 = point1.X + (double) index * num1;
            point1 = this.StartPoint;
            double y4 = point1.Y + (double) index * num2 + this.Boyut / 7.0 * 10.0;
            Point point3 = new Point(x4, y4);
            lineGeometry3.EndPoint = point3;
            LineGeometry lineGeometry4 = lineGeometry1;
            double açı = this.Açı;
            point1 = lineGeometry1.StartPoint;
            double x5 = point1.X;
            point1 = lineGeometry1.EndPoint;
            double x6 = point1.X;
            double centerX = (x5 + x6) / 2.0;
            point1 = lineGeometry1.StartPoint;
            double y5 = point1.Y;
            point1 = lineGeometry1.EndPoint;
            double y6 = point1.Y;
            double centerY = (y5 + y6) / 2.0;
            RotateTransform rotateTransform = new RotateTransform(açı, centerX, centerY);
            lineGeometry4.Transform = (Transform) rotateTransform;
            this.GG.Children.Add((Geometry) lineGeometry1);
            this.StrokeThickness = this.Boyut / 7.0;
          }
        }
        else
        {
          LineGeometry lineGeometry1 = new LineGeometry();
          LineGeometry lineGeometry2 = lineGeometry1;
          Point point1 = this.StartPoint;
          double x1 = point1.X;
          point1 = this.StartPoint;
          double y1 = point1.Y - this.Boyut / 7.0 * 10.0;
          Point point2 = new Point(x1, y1);
          lineGeometry2.StartPoint = point2;
          LineGeometry lineGeometry3 = lineGeometry1;
          point1 = this.StartPoint;
          double x2 = point1.X;
          point1 = this.StartPoint;
          double y2 = point1.Y + this.Boyut / 7.0 * 10.0;
          Point point3 = new Point(x2, y2);
          lineGeometry3.EndPoint = point3;
          LineGeometry lineGeometry4 = lineGeometry1;
          double açı = this.Açı;
          point1 = lineGeometry1.StartPoint;
          double x3 = point1.X;
          point1 = lineGeometry1.EndPoint;
          double x4 = point1.X;
          double centerX = (x3 + x4) / 2.0;
          point1 = lineGeometry1.StartPoint;
          double y3 = point1.Y;
          point1 = lineGeometry1.EndPoint;
          double y4 = point1.Y;
          double centerY = (y3 + y4) / 2.0;
          RotateTransform rotateTransform = new RotateTransform(açı, centerX, centerY);
          lineGeometry4.Transform = (Transform) rotateTransform;
          this.GG.Children.Add((Geometry) lineGeometry1);
          this.StrokeThickness = this.Boyut / 7.0;
        }
      }
      else if (this.PatTipi == Pat.PatTipleri.Düğme_İlik)
      {
        if (this.Adet != 1)
        {
          Point point1 = this.EndPoint;
          double x1 = point1.X;
          point1 = this.StartPoint;
          double x2 = point1.X;
          double num1 = (x1 - x2) / (double) (this.Adet - 1);
          point1 = this.EndPoint;
          double y1 = point1.Y;
          point1 = this.StartPoint;
          double y2 = point1.Y;
          double num2 = (y1 - y2) / (double) (this.Adet - 1);
          for (int index = 0; index < this.Adet; ++index)
          {
            LineGeometry lineGeometry1 = new LineGeometry();
            LineGeometry lineGeometry2 = lineGeometry1;
            point1 = this.StartPoint;
            double x3 = point1.X + (double) index * num1;
            point1 = this.StartPoint;
            double y3 = point1.Y + (double) index * num2 - this.Boyut / 7.0 * 10.0;
            Point point2 = new Point(x3, y3);
            lineGeometry2.StartPoint = point2;
            LineGeometry lineGeometry3 = lineGeometry1;
            point1 = this.StartPoint;
            double x4 = point1.X + (double) index * num1;
            point1 = this.StartPoint;
            double y4 = point1.Y + (double) index * num2 + this.Boyut / 7.0 * 10.0;
            Point point3 = new Point(x4, y4);
            lineGeometry3.EndPoint = point3;
            LineGeometry lineGeometry4 = lineGeometry1;
            double açı = this.Açı;
            point1 = lineGeometry1.StartPoint;
            double x5 = point1.X;
            point1 = lineGeometry1.EndPoint;
            double x6 = point1.X;
            double centerX = (x5 + x6) / 2.0;
            point1 = lineGeometry1.StartPoint;
            double y5 = point1.Y;
            point1 = lineGeometry1.EndPoint;
            double y6 = point1.Y;
            double centerY = (y5 + y6) / 2.0;
            RotateTransform rotateTransform = new RotateTransform(açı, centerX, centerY);
            lineGeometry4.Transform = (Transform) rotateTransform;
            this.GG.Children.Add((Geometry) lineGeometry1);
            EllipseGeometry ellipseGeometry1 = new EllipseGeometry();
            ellipseGeometry1.RadiusX = ellipseGeometry1.RadiusY = this.Boyut;
            EllipseGeometry ellipseGeometry2 = ellipseGeometry1;
            point1 = this.StartPoint;
            double x7 = point1.X + (double) index * num1;
            point1 = this.StartPoint;
            double y7 = point1.Y + (double) index * num2;
            Point point4 = new Point(x7, y7);
            ellipseGeometry2.Center = point4;
            EllipseGeometry ellipseGeometry3 = new EllipseGeometry();
            ellipseGeometry3.RadiusX = ellipseGeometry3.RadiusY = this.Boyut / 7.0 * 2.0;
            EllipseGeometry ellipseGeometry4 = ellipseGeometry3;
            point1 = ellipseGeometry1.Center;
            double x8 = point1.X + this.Boyut / 7.0 * 3.0;
            point1 = ellipseGeometry1.Center;
            double y8 = point1.Y + this.Boyut / 7.0 * 3.0;
            Point point5 = new Point(x8, y8);
            ellipseGeometry4.Center = point5;
            EllipseGeometry ellipseGeometry5 = new EllipseGeometry();
            ellipseGeometry5.RadiusX = ellipseGeometry5.RadiusY = this.Boyut / 7.0 * 2.0;
            EllipseGeometry ellipseGeometry6 = ellipseGeometry5;
            point1 = ellipseGeometry1.Center;
            double x9 = point1.X + this.Boyut / 7.0 * 3.0;
            point1 = ellipseGeometry1.Center;
            double y9 = point1.Y - this.Boyut / 7.0 * 3.0;
            Point point6 = new Point(x9, y9);
            ellipseGeometry6.Center = point6;
            EllipseGeometry ellipseGeometry7 = new EllipseGeometry();
            ellipseGeometry7.RadiusX = ellipseGeometry7.RadiusY = this.Boyut / 7.0 * 2.0;
            EllipseGeometry ellipseGeometry8 = ellipseGeometry7;
            point1 = ellipseGeometry1.Center;
            double x10 = point1.X - this.Boyut / 7.0 * 3.0;
            point1 = ellipseGeometry1.Center;
            double y10 = point1.Y + this.Boyut / 7.0 * 3.0;
            Point point7 = new Point(x10, y10);
            ellipseGeometry8.Center = point7;
            EllipseGeometry ellipseGeometry9 = new EllipseGeometry();
            ellipseGeometry9.RadiusX = ellipseGeometry9.RadiusY = this.Boyut / 7.0 * 2.0;
            EllipseGeometry ellipseGeometry10 = ellipseGeometry9;
            point1 = ellipseGeometry1.Center;
            double x11 = point1.X - this.Boyut / 7.0 * 3.0;
            point1 = ellipseGeometry1.Center;
            double y11 = point1.Y - this.Boyut / 7.0 * 3.0;
            Point point8 = new Point(x11, y11);
            ellipseGeometry10.Center = point8;
            this.GG.Children.Add((Geometry) ellipseGeometry1);
            this.GG.Children.Add((Geometry) ellipseGeometry3);
            this.GG.Children.Add((Geometry) ellipseGeometry5);
            this.GG.Children.Add((Geometry) ellipseGeometry7);
            this.GG.Children.Add((Geometry) ellipseGeometry9);
            this.StrokeThickness = this.Boyut / 7.0;
          }
        }
        else
        {
          LineGeometry lineGeometry1 = new LineGeometry();
          LineGeometry lineGeometry2 = lineGeometry1;
          Point point1 = this.StartPoint;
          double x1 = point1.X;
          point1 = this.StartPoint;
          double y1 = point1.Y - this.Boyut / 7.0 * 10.0;
          Point point2 = new Point(x1, y1);
          lineGeometry2.StartPoint = point2;
          LineGeometry lineGeometry3 = lineGeometry1;
          point1 = this.StartPoint;
          double x2 = point1.X;
          point1 = this.StartPoint;
          double y2 = point1.Y + this.Boyut / 7.0 * 10.0;
          Point point3 = new Point(x2, y2);
          lineGeometry3.EndPoint = point3;
          LineGeometry lineGeometry4 = lineGeometry1;
          double açı = this.Açı;
          point1 = lineGeometry1.StartPoint;
          double x3 = point1.X;
          point1 = lineGeometry1.EndPoint;
          double x4 = point1.X;
          double centerX = (x3 + x4) / 2.0;
          point1 = lineGeometry1.StartPoint;
          double y3 = point1.Y;
          point1 = lineGeometry1.EndPoint;
          double y4 = point1.Y;
          double centerY = (y3 + y4) / 2.0;
          RotateTransform rotateTransform = new RotateTransform(açı, centerX, centerY);
          lineGeometry4.Transform = (Transform) rotateTransform;
          this.GG.Children.Add((Geometry) lineGeometry1);
          EllipseGeometry ellipseGeometry1 = new EllipseGeometry();
          ellipseGeometry1.RadiusX = ellipseGeometry1.RadiusY = this.Boyut;
          EllipseGeometry ellipseGeometry2 = ellipseGeometry1;
          point1 = this.StartPoint;
          double x5 = point1.X;
          point1 = this.StartPoint;
          double y5 = point1.Y;
          Point point4 = new Point(x5, y5);
          ellipseGeometry2.Center = point4;
          EllipseGeometry ellipseGeometry3 = new EllipseGeometry();
          ellipseGeometry3.RadiusX = ellipseGeometry3.RadiusY = this.Boyut / 7.0 * 2.0;
          EllipseGeometry ellipseGeometry4 = ellipseGeometry3;
          point1 = ellipseGeometry1.Center;
          double x6 = point1.X + this.Boyut / 7.0 * 3.0;
          point1 = ellipseGeometry1.Center;
          double y6 = point1.Y + this.Boyut / 7.0 * 3.0;
          Point point5 = new Point(x6, y6);
          ellipseGeometry4.Center = point5;
          EllipseGeometry ellipseGeometry5 = new EllipseGeometry();
          ellipseGeometry5.RadiusX = ellipseGeometry5.RadiusY = this.Boyut / 7.0 * 2.0;
          EllipseGeometry ellipseGeometry6 = ellipseGeometry5;
          point1 = ellipseGeometry1.Center;
          double x7 = point1.X + this.Boyut / 7.0 * 3.0;
          point1 = ellipseGeometry1.Center;
          double y7 = point1.Y - this.Boyut / 7.0 * 3.0;
          Point point6 = new Point(x7, y7);
          ellipseGeometry6.Center = point6;
          EllipseGeometry ellipseGeometry7 = new EllipseGeometry();
          ellipseGeometry7.RadiusX = ellipseGeometry7.RadiusY = this.Boyut / 7.0 * 2.0;
          EllipseGeometry ellipseGeometry8 = ellipseGeometry7;
          point1 = ellipseGeometry1.Center;
          double x8 = point1.X - this.Boyut / 7.0 * 3.0;
          point1 = ellipseGeometry1.Center;
          double y8 = point1.Y + this.Boyut / 7.0 * 3.0;
          Point point7 = new Point(x8, y8);
          ellipseGeometry8.Center = point7;
          EllipseGeometry ellipseGeometry9 = new EllipseGeometry();
          ellipseGeometry9.RadiusX = ellipseGeometry9.RadiusY = this.Boyut / 7.0 * 2.0;
          EllipseGeometry ellipseGeometry10 = ellipseGeometry9;
          point1 = ellipseGeometry1.Center;
          double x9 = point1.X - this.Boyut / 7.0 * 3.0;
          point1 = ellipseGeometry1.Center;
          double y9 = point1.Y - this.Boyut / 7.0 * 3.0;
          Point point8 = new Point(x9, y9);
          ellipseGeometry10.Center = point8;
          this.GG.Children.Add((Geometry) ellipseGeometry1);
          this.GG.Children.Add((Geometry) ellipseGeometry3);
          this.GG.Children.Add((Geometry) ellipseGeometry5);
          this.GG.Children.Add((Geometry) ellipseGeometry7);
          this.GG.Children.Add((Geometry) ellipseGeometry9);
          this.StrokeThickness = this.Boyut / 7.0;
        }
      }
      else
      {
        if (this.PatTipi != Pat.PatTipleri.Düğme_Arka)
          return;
        if (this.Adet != 1)
        {
          Point point1 = this.EndPoint;
          double x1 = point1.X;
          point1 = this.StartPoint;
          double x2 = point1.X;
          double num1 = (x1 - x2) / (double) (this.Adet - 1);
          point1 = this.EndPoint;
          double y1 = point1.Y;
          point1 = this.StartPoint;
          double y2 = point1.Y;
          double num2 = (y1 - y2) / (double) (this.Adet - 1);
          for (int index = 0; index < this.Adet; ++index)
          {
            LineGeometry lineGeometry1 = new LineGeometry();
            LineGeometry lineGeometry2 = lineGeometry1;
            point1 = this.StartPoint;
            double x3 = point1.X + (double) index * num1;
            point1 = this.StartPoint;
            double y3 = point1.Y + (double) index * num2 - this.Boyut / 7.0 * 6.0;
            Point point2 = new Point(x3, y3);
            lineGeometry2.StartPoint = point2;
            LineGeometry lineGeometry3 = lineGeometry1;
            point1 = this.StartPoint;
            double x4 = point1.X + (double) index * num1;
            point1 = this.StartPoint;
            double y4 = point1.Y + (double) index * num2 + this.Boyut / 7.0 * 6.0;
            Point point3 = new Point(x4, y4);
            lineGeometry3.EndPoint = point3;
            LineGeometry lineGeometry4 = lineGeometry1;
            double angle1 = 45.0;
            point1 = lineGeometry1.StartPoint;
            double x5 = point1.X;
            point1 = lineGeometry1.EndPoint;
            double x6 = point1.X;
            double centerX1 = (x5 + x6) / 2.0;
            point1 = lineGeometry1.StartPoint;
            double y5 = point1.Y;
            point1 = lineGeometry1.EndPoint;
            double y6 = point1.Y;
            double centerY1 = (y5 + y6) / 2.0;
            RotateTransform rotateTransform1 = new RotateTransform(angle1, centerX1, centerY1);
            lineGeometry4.Transform = (Transform) rotateTransform1;
            LineGeometry lineGeometry5 = new LineGeometry();
            LineGeometry lineGeometry6 = lineGeometry5;
            point1 = this.StartPoint;
            double x7 = point1.X + (double) index * num1 - this.Boyut / 7.0 * 6.0;
            point1 = this.StartPoint;
            double y7 = point1.Y + (double) index * num2;
            Point point4 = new Point(x7, y7);
            lineGeometry6.StartPoint = point4;
            LineGeometry lineGeometry7 = lineGeometry5;
            point1 = this.StartPoint;
            double x8 = point1.X + (double) index * num1 + this.Boyut / 7.0 * 6.0;
            point1 = this.StartPoint;
            double y8 = point1.Y + (double) index * num2;
            Point point5 = new Point(x8, y8);
            lineGeometry7.EndPoint = point5;
            LineGeometry lineGeometry8 = lineGeometry5;
            double angle2 = 45.0;
            point1 = lineGeometry5.StartPoint;
            double x9 = point1.X;
            point1 = lineGeometry5.EndPoint;
            double x10 = point1.X;
            double centerX2 = (x9 + x10) / 2.0;
            point1 = lineGeometry5.StartPoint;
            double y9 = point1.Y;
            point1 = lineGeometry5.EndPoint;
            double y10 = point1.Y;
            double centerY2 = (y9 + y10) / 2.0;
            RotateTransform rotateTransform2 = new RotateTransform(angle2, centerX2, centerY2);
            lineGeometry8.Transform = (Transform) rotateTransform2;
            this.GG.Children.Add((Geometry) lineGeometry1);
            this.GG.Children.Add((Geometry) lineGeometry5);
            this.StrokeThickness = this.Boyut / 7.0;
          }
        }
        else
        {
          LineGeometry lineGeometry1 = new LineGeometry();
          LineGeometry lineGeometry2 = lineGeometry1;
          Point point1 = this.StartPoint;
          double x1 = point1.X;
          point1 = this.StartPoint;
          double y1 = point1.Y - this.Boyut / 7.0 * 6.0;
          Point point2 = new Point(x1, y1);
          lineGeometry2.StartPoint = point2;
          LineGeometry lineGeometry3 = lineGeometry1;
          point1 = this.StartPoint;
          double x2 = point1.X;
          point1 = this.StartPoint;
          double y2 = point1.Y + this.Boyut / 7.0 * 6.0;
          Point point3 = new Point(x2, y2);
          lineGeometry3.EndPoint = point3;
          LineGeometry lineGeometry4 = lineGeometry1;
          double angle1 = 45.0;
          point1 = lineGeometry1.StartPoint;
          double x3 = point1.X;
          point1 = lineGeometry1.EndPoint;
          double x4 = point1.X;
          double centerX1 = (x3 + x4) / 2.0;
          point1 = lineGeometry1.StartPoint;
          double y3 = point1.Y;
          point1 = lineGeometry1.EndPoint;
          double y4 = point1.Y;
          double centerY1 = (y3 + y4) / 2.0;
          RotateTransform rotateTransform1 = new RotateTransform(angle1, centerX1, centerY1);
          lineGeometry4.Transform = (Transform) rotateTransform1;
          LineGeometry lineGeometry5 = new LineGeometry();
          LineGeometry lineGeometry6 = lineGeometry5;
          point1 = this.StartPoint;
          double x5 = point1.X - this.Boyut / 7.0 * 6.0;
          point1 = this.StartPoint;
          double y5 = point1.Y;
          Point point4 = new Point(x5, y5);
          lineGeometry6.StartPoint = point4;
          LineGeometry lineGeometry7 = lineGeometry5;
          point1 = this.StartPoint;
          double x6 = point1.X + this.Boyut / 7.0 * 6.0;
          point1 = this.StartPoint;
          double y6 = point1.Y;
          Point point5 = new Point(x6, y6);
          lineGeometry7.EndPoint = point5;
          LineGeometry lineGeometry8 = lineGeometry5;
          double angle2 = 45.0;
          point1 = lineGeometry5.StartPoint;
          double x7 = point1.X;
          point1 = lineGeometry5.EndPoint;
          double x8 = point1.X;
          double centerX2 = (x7 + x8) / 2.0;
          point1 = lineGeometry5.StartPoint;
          double y7 = point1.Y;
          point1 = lineGeometry5.EndPoint;
          double y8 = point1.Y;
          double centerY2 = (y7 + y8) / 2.0;
          RotateTransform rotateTransform2 = new RotateTransform(angle2, centerX2, centerY2);
          lineGeometry8.Transform = (Transform) rotateTransform2;
          this.GG.Children.Add((Geometry) lineGeometry1);
          this.GG.Children.Add((Geometry) lineGeometry5);
          this.StrokeThickness = this.Boyut / 7.0;
        }
      }
    }

    public enum PatTipleri
    {
      Düğme = 0,
      İlik = 1,
      Düğme_İlik = 2,
      Düğme_Arka = 3
    }
  }
}
